User Interface Design Smell: Automatic Detection and Refactoring of Blob Listeners

نویسندگان

  • Arnaud Blouin
  • Valéria Lelli
  • Benoit Baudry
  • Fabien Coulon
چکیده

Context. User Interfaces (UIs) intensively rely on event-driven programming: widgets send UI events, which capture users’ interactions, to dedicated objects called controllers. Controllers use several UI listeners that handle these events to produce UI commands. Objective. The first objective of this work is to show empirical evidences that the code that describes and controls UIs can be affected by design smells, as any software artifact. The second objective is to show that because UI code is intertwined with the rest of the code, specific code analysis procedures are required to detect and refactor UI design smells. Method. We conducted an empirical study on four large Java Swing and SWT open-source software systems: Eclipse, JabRef, ArgouML, and FreeCol. We study to what extent the number of UI commands that a UI listener can produce has an impact on the changeand fault-proneness of the UI listener code. Results. We identify a new type of design smell, called Blob listener that characterizes UI listeners that can produce more than two UI commands. We propose a systematic static code analysis procedure that searches for Blob listener that we implement in InspectorGuidget. We conducted experiments on the four software systems for which we manually identified 53 instances of Blob listener. InspectorGuidget successfully detected 52 Blob listeners out of 53. The results exhibit a precision of 81.25 % and a recall of 98.11 %. We then developed a semi-automatically and behavior-preserving refactoring process to remove Blob listeners. 49.06 % of the 53 Blob listeners were automatically refactored. Patches for JabRef, and FreeCol have been accepted and merged. Discussions with developers of the four software systems assess the relevance of the Blob listener. Conclusion. This work shows that UI code also suffers from design smells that have to be identified and characterized. We argue that studies have to be conducted to find other UI design smells and tools that analyze UI code must be developed.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Similar Code Detection and Elimination for Erlang Programs

A well-known bad code smell in refactoring and software maintenance is duplicated code, that is the existence of code clones, which are code fragments that are identical or similar to one another. Unjustified code clones increase code size, make maintenance and comprehension more difficult, and also indicate design problems such as a lack of encapsulation or abstraction. This paper describes an...

متن کامل

Software Refactoring with Appropriate Resolution Order of Code Smells

Code smells are structured characteristics of software that may indicate a code or design problem.It makes a software hard to evolve and maintain and may trigger refactoring of code.It have a different types of code smells,refactoring tools,but it doesn’t know the sequence of code smells to be resolved first.Identifying and detecting the code smells are performed rarely because all types in the...

متن کامل

Detection and Removal of Bad Smells instantly using a InsRefactor

-Software refactoring is one of the essential techniques which are used to improve the software quality without affecting any of the external functionality of the software. There were numerous of software refactoring tools and code smells detection tools which are to be automatic or semi automatic. Most of these tools were human driven, so Software refactoring depends on developers’ spontaneity...

متن کامل

User Interface Design in Mobile Educational Applications

Introduction: User interfaces are a crucial factor in ensuring the success of mobile applications. Mobile Educational Applications not only provide flexibility in learning, but also allow learners to learn at any time and any place. The purpose of this article is to investigate the effective factors affecting the design of the user interface in mobile educational applications. Methods: Quantita...

متن کامل

Impacts and Detection of Design Smells Impacts and Detection of Design Smells

Changes are continuously made in the source code to take into account the needs of the customers and fix the faults. Continuous change can lead to antipatterns and code smells, collectively called “design smells” to occur in the source code. Design smells are poor solutions to recurring design or implementation problems, typically in object-oriented development. During comprehension and changes...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1703.10674  شماره 

صفحات  -

تاریخ انتشار 2017